package com.example.administrator.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

/**
 * Created by Administrator on 2020/11/19.
 */

public class TreeActivity extends AppCompatActivity {


    private TextView usernametv;
    private TextView scoretv;
    private TextView ispassed;
    private String username;
    private int score;
    private boolean isPassed;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tree);
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        usernametv = findViewById(R.id.username_tv);
        scoretv = findViewById(R.id.score_tv);
        ispassed = findViewById(R.id.ispassed_tv);
    }

    private void initData() {
        Intent intent = getIntent();
        username = intent.getStringExtra("studentName");
        score = intent.getIntExtra("score",0);
        isPassed = intent.getBooleanExtra("ispassed",true);
        usernametv.setText(username +"");
        scoretv.setText(score +"");
        ispassed.setText(isPassed +"");

    }
    private void initEvent() {



    }
}
